All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.std.movies.Track
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.std.movies.Track
- public final class Track
- extends QTObject
- implements QuickTimeLib
The Track class implements the corresponding data structure of the Movie Toolbox.
A QuickTime movie may contain several tracks. Each track refers to a media that contains references
to the movie data, which may be stored as images or sound on hard disks, floppy disks, compact discs, or other devices.
Specifies the track for an operation. Your application obtains a track identifier from
such Movie Toolbox functions as NewMovieTrack and GetMovieTrack (described on page 2-151 of
Inside Macintosh: QuickTime and page 2-204 of Inside Macintosh: QuickTime, respectively).
You make a new Track object only through addTrack or getTrack methods on a movie object.
-
addReference(Track, int)
- This method allows you to add a new track reference to a track.
-
copySettings(Track)
- This method copies many settings from one track to another, overwriting the destination settings.
-
deleteReference(int, int)
- This method allows you to remove a track reference from a track.
-
deleteSegment(int, int)
- This method removes a specified segment from a track.
-
fromMedia(Media)
- This method allows you to determine the track that uses a specified media.
-
fromMovieImporterDataRef(MovieImporter, DataRef, Movie, Track, int, int)
- Determines information revelant to the movie import component.
-
fromMovieImporterFile(MovieImporter, QTFile, Movie, Track, int, int)
- Allows the MovieToolbox to import data from a file using the movie import component.
-
fromMovieImporterHandle(MovieImporter, QTHandleRef, Movie, Track, int, int)
- Allows the MovieToolbox to import data from a handle using the movie import component.
-
getAlternate()
- This method allows your application to determine all the tracks in an alternate group.
-
getBoundsRgn()
- This method allows the media to limit the size of the track boundary rectangle.
-
getClipRgn()
- This method allows your application to determine the clipping region of a track.
-
getCreationTime()
- This method returns a track's creation date.
-
getDataSize(int, int)
- This method allows your application to determine the size, in bytes,
of the sample data in a segment of a track.
-
getDimensions()
- This method allows your application to determine a track's source, or display, rectangle.
-
getDisplayBoundsRgn()
- This method allows your application to determine the region a track occupies in a movie's graphics world.
-
getDisplayMatrix()
- This method returns the track's display matrix.
-
getDuration()
- This method returns the duration of a track.
-
getEditRate(int)
- This method returns the rate of the track edit of a specified track at an indicated time.
-
getEnabled()
- This method allows your application to determine whether a track is currently enabled.
-
getID()
- This method allows your application to determine a track's unique track ID value.
-
getLayer()
- This method allows your application to retrieve a track's layer.
-
getLoadSettings()
- This method allows you to retrieve a track's preload information.
-
getMatrix()
- This method allows your application to retrieve a track's transformation matrix.
-
getModificationTime()
- This method returns a track's modification date.
-
getMovie()
- This method allows you to determine the movie that contains a specified track.
-
getMovieBoundsRgn()
- This method allows your application to determine the region the track occupies in a movie's boundary region.
-
getNextInterestingTime(int, int, float)
- This method searches for times of interest in a track.
-
getNextReferenceType(int)
- This method allows you to determine all of the track reference types that are defined for a given track.
-
getOffset()
- This method allows your application to determine the time difference between the start of a track
and the start of the movie that contains the track.
-
getPict(int)
- This method creates a QuickDraw picture from the specified track at the specified time.
-
getReference(int, int)
- This method allows you to retrieve the track identifier contained in an existing track reference.
-
getReferenceCount(int)
- This method allows you to determine how many track references of a given type exist for a track.
-
getSegmentDisplayBoundsRgn(int, int)
- This method allows your application to determine the region a track occupies in a movie's graphics
world during a specified segment.
-
getSoundLocalizationSettings()
- This method returns the sound localization settings for the track.
-
getStatus()
- This method returns the value of the last error the media encountered while playing a specified track.
-
getUsage()
- This method allows your application to determine whether a track is used in a movie,
its preview, its poster, or a combination of these.
-
getUserData()
- This method allows your application to obtain access to a track's user data list.
-
getVolume()
- This method returns a track's current volume setting.
-
insertEmptySegment(int, int)
- This method adds an empty segment to a track.
-
insertMedia(int, int, int, float)
- This method inserts a reference to a media segment into a track.
-
insertSegment(Track, int, int, int)
- This method copies part of one track to another.
-
isScrapMovie()
- Looks on the System scrap to find out if it can translate any of the track data into a movie.
-
loadIntoRam(int, int, int)
- This method loads a track's data into memory.
-
newEditState()
- You can create an edit state by calling the NewTrackEditState function.
-
pointInMovie(QDPoint)
- This method allows your application to determine whether a specified point lies in the region
defined by a track's display boundary region after
it has been clipped by the movie's final display clipping region.
-
removeMedia()
- Removes a track's media.
-
scaleSegment(int, int, int)
- This method changes the duration of a segment of a track.
-
setAlternate(Track)
- This method allows your application to add tracks to or remove tracks from alternate groups.
-
setClipRgn(Region)
- This method allows your application to set the clipping region of a track.
-
setDimensions(Dimension)
- This method allows your application to establish a track's source, or display, rectangle.
-
setEnabled(boolean)
- This method allows your application to enable and disable a track.
-
setGWorld(QDGraphics, GDevice)
- This method sets a new QDGraphics for the track.
-
setLayer(int)
- This method allows your application to set a track's layer.
-
setLoadSettings(LoadSettings)
- This method allows you to specify a portion of a track that is to be loaded into memory whenever it is played.
-
setMatrix(Matrix)
- This method allows your application to establish a track's transformation matrix.
-
setOffset(int)
- This method modifies the duration of the empty space that lies at the beginning of
the track, thus changing the duration of the entire track.
-
setReference(Track, int, int)
- This method allows you to modify an existing track reference.
-
setSoundLocalizationSettings(QTHandle)
- This method allows your application to set the sound localization settings for the track.
-
setUsage(int)
- This method allows your application to specify whether a track is used in a movie,
its preview, its poster, or a combination of these.
-
setVolume(float)
- This method allows your application to set a track's current volume.
-
toString()
- String representation of this class.
-
trackTimeToMediaTime(int)
- This method allows your application to convert a track's time value to a time value
that is appropriate to the track's media using the track's edit list.
-
useEditState(TrackEditState)
- This method returns a track to its condition according to an edit state you created previously.
fromMedia
public static Track fromMedia(Media m) throws QTException
- This method allows you to determine the track that uses a specified media.
QuickTime::GetMediaTrack()
- Returns:
- a Track object of the track that uses the media.
- See Also:
- getTrack
fromMovieImporterFile
public static MovieImportInfo fromMovieImporterFile(MovieImporter mi,
QTFile fileIn,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags) throws QTException
- Allows the MovieToolbox to import data from a file using the movie import component.
QuickTime::MovieImportFile
- Parameters:
- fileIn - Specifies the source file to the importing data.
- theMovie - Specifies the movie to receive the data.
- targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
- atTime - Specifies the start time of the movie time base to place the imported data.
- inFlags - Specifies the control flags governing the operation.
- Returns:
- The results pertinent to the operation.
- See Also:
- fromFile
fromMovieImporterHandle
public static MovieImportInfo fromMovieImporterHandle(MovieImporter mi,
QTHandleRef dataRef,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags) throws QTException
- Allows the MovieToolbox to import data from a handle using the movie import component.
QuickTime::MovieImportHandle
- Parameters:
- dataRef - Specifies the handle to the importing data.
- theMovie - Specifies the movie to receive the data.
- targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
- atTime - Specifies the start time of the movie time base to place the imported data.
- inFlags - Specifies the control flags governing the operation.
- Returns:
- The results pertinent to the operation.
- See Also:
- fromHandle
fromMovieImporterDataRef
public static MovieImportInfo fromMovieImporterDataRef(MovieImporter mi,
DataRef dataRef,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags) throws QTException
- Determines information revelant to the movie import component.
The info kept are the track used, time value added, and flags describing the operation.
QuickTime::MovieImportDataRef
- Parameters:
- dataRef - Specifies the data reference.
- theMovie - Specifies the movie.
- targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
- atTime - Specifies the start time of the movie time base.
- inFlags - Specifies the flags in for the operation.
- Returns:
- The results returned from the query operation.
- See Also:
- fromDataRef
removeMedia
public void removeMedia() throws StdQTException
- Removes a track's media.
QuickTime::DisposeTrackMedia()
setGWorld
public void setGWorld(QDGraphics port,
GDevice gdh) throws StdQTException
- This method sets a new QDGraphics for the track.
QuickTime::SetTrackGWorld()
- Parameters:
- port - the new destination port or null to use the movies port
- gdh - the new device or null to use the current device
getPict
public Pict getPict(int time) throws QTException
- This method creates a QuickDraw picture from the specified track at the specified time.
QuickTime::GetTrackPict()
- Parameters:
- time - Specifies the track image for the picture. The time parameter contains the time from which the image is taken.
- Returns:
- a Pict object for the specified time.
getClipRgn
public Region getClipRgn() throws QTException
- This method allows your application to determine the clipping region of a track.
QuickTime::GetTrackClipRgn()
- Returns:
- a Region object specifying the clip region for this track.
setClipRgn
public void setClipRgn(Region theClip) throws StdQTException
- This method allows your application to set the clipping region of a track.
QuickTime::SetTrackClipRgn()
- Parameters:
- theClip - Specifies the track's clipping region.
getDisplayBoundsRgn
public Region getDisplayBoundsRgn() throws QTException
- This method allows your application to determine the region a track occupies in a movie's graphics world.
QuickTime::GetTrackDisplayBoundsRgn()
- Returns:
- a Region object specifying the track's bounds region.
getMovieBoundsRgn
public Region getMovieBoundsRgn() throws QTException
- This method allows your application to determine the region the track occupies in a movie's boundary region.
QuickTime::GetTrackMovieBoundsRgn()
- Returns:
- a Region object specifying the region the track occupies in a movie's boundary region.
getBoundsRgn
public Region getBoundsRgn() throws QTException
- This method allows the media to limit the size of the track boundary rectangle. Therefore, the region
returned by GetTrackBoundsRgn may not be rectangular and may be smaller than the track boundary region.
QuickTime::GetTrackBoundsRgn()
- Returns:
- a Region object specifying the region track's media uses to do drawing.
getID
public int getID() throws StdQTException
- This method allows your application to determine a track's unique track ID value.
QuickTime::GetTrackID()
- Returns:
- the track's ID value.
getCreationTime
public int getCreationTime() throws StdQTException
- This method returns a track's creation date.
QuickTime::GetTrackCreationTime()
- Returns:
- the track's creation date.
getModificationTime
public int getModificationTime() throws StdQTException
- This method returns a track's modification date.
QuickTime::GetTrackModificationTime()
- Returns:
- the track's modification date.
getEnabled
public boolean getEnabled() throws StdQTException
- This method allows your application to determine whether a track is currently enabled.
QuickTime::GetTrackEnabled()
- Returns:
- true if the track is enabled and false if the track is disabled.
setEnabled
public void setEnabled(boolean enabled) throws StdQTException
- This method allows your application to enable and disable a track.
QuickTime::SetTrackEnabled()
- Parameters:
- enabled - Enables or disables the track. Set this parameter to true
to enable the track. Set this parameter to false to disable the track.
getUsage
public int getUsage() throws StdQTException
- This method allows your application to determine whether a track is used in a movie,
its preview, its poster, or a combination of these.
QuickTime::GetTrackUsage()
- Returns:
- flags indicating the track's usage.
setUsage
public void setUsage(int usage) throws StdQTException
- This method allows your application to specify whether a track is used in a movie,
its preview, its poster, or a combination of these.
QuickTime::SetTrackUsage()
- Parameters:
- usage - Contains flags that specify how the track is to be used.
getDuration
public int getDuration() throws StdQTException
- This method returns the duration of a track.
QuickTime::GetTrackDuration()
- Returns:
- the duration of a track.
getOffset
public int getOffset() throws StdQTException
- This method allows your application to determine the time difference between the start of a track
and the start of the movie that contains the track.
QuickTime::GetTrackOffset()
- Returns:
- the track's offset from the start of the movie
setOffset
public void setOffset(int movieOffsetTime) throws StdQTException
- This method modifies the duration of the empty space that lies at the beginning of
the track, thus changing the duration of the entire track.
QuickTime::SetTrackOffset()
- Parameters:
- movieOffsetTime - Specifies the track's offset from the start of the movie, and must be expressed
in the time scale of the movie that contains the track.
getLayer
public int getLayer() throws StdQTException
- This method allows your application to retrieve a track's layer.
QuickTime::GetTrackLayer()
- Returns:
- the track's layer number.
setLayer
public void setLayer(int layer) throws StdQTException
- This method allows your application to set a track's layer.
QuickTime::SetTrackLayer()
- Parameters:
- layer - Specifies the track's layer number.
getAlternate
public Track getAlternate() throws QTException
- This method allows your application to determine all the tracks in an alternate group.
QuickTime::GetTrackAlternate()
- Returns:
- the Track object of the next track in the group.
setAlternate
public void setAlternate(Track alternateT) throws StdQTException
- This method allows your application to add tracks to or remove tracks from alternate groups.
QuickTime::SetTrackAlternate()
- Parameters:
- alternateT - Controls whether the function adds the track to a group or removes it from a group.
getVolume
public float getVolume() throws StdQTException
- This method returns a track's current volume setting.
QuickTime::GetTrackVolume()
- Returns:
- a track's current volume setting.
setVolume
public void setVolume(float volume) throws StdQTException
- This method allows your application to set a track's current volume.
QuickTime::SetTrackVolume()
- Parameters:
- volume - Specifies the current volume setting of the track.
getMatrix
public Matrix getMatrix() throws StdQTException
- This method allows your application to retrieve a track's transformation matrix.
QuickTime::GetTrackMatrix()
- Returns:
- a Matrix object specifying the track's transformation matrix.
setMatrix
public void setMatrix(Matrix matrix) throws StdQTException
- This method allows your application to establish a track's transformation matrix.
QuickTime::SetTrackMatrix()
- Parameters:
- matrix - Specifies the track's new matrix.
getDimensions
public Dimension getDimensions() throws StdQTException
- This method allows your application to determine a track's source, or display, rectangle.
QuickTime::GetTrackDimensions()
- Returns:
- a Dimension object containing the track's width and height in pixels.
setDimensions
public void setDimensions(Dimension d) throws StdQTException
- This method allows your application to establish a track's source, or display, rectangle.
QuickTime::SetTrackDimensions()
- Parameters:
- d - a Dimension object containing the width and height, in pixels, of the track's rectangle.
getUserData
public UserData getUserData() throws StdQTException
- This method allows your application to obtain access to a track's user data list.
QuickTime::GetTrackUserData()
- Returns:
- a UserData object referencing the track's user data list.
getDisplayMatrix
public Matrix getDisplayMatrix() throws StdQTException
- This method returns the track's display matrix.
QuickTime::GetTrackDisplayMatrix()
- Returns:
- the track's display matrix.
getSoundLocalizationSettings
public QTHandle getSoundLocalizationSettings() throws QTException
- This method returns the sound localization settings for the track.
QuickTime::GetTrackSoundLocalizationSettings()
- Returns:
- the sound localization settings for the track.
setSoundLocalizationSettings
public void setSoundLocalizationSettings(QTHandle newSettings) throws StdQTException
- This method allows your application to set the sound localization settings for the track.
QuickTime::SetTrackSoundLocalizationSettings()
- Parameters:
- newSettings - Specifies the new sound localization settings for the track
getMovie
public Movie getMovie() throws StdQTException
- This method allows you to determine the movie that contains a specified track.
QuickTime::GetTrackMovie()
- Returns:
- a Movie object that corresponds to the movie that contains the track.
getNextInterestingTime
public TimeInfo getNextInterestingTime(int interestingTimeFlags,
int time,
float rate) throws StdQTException
- This method searches for times of interest in a track.
QuickTime::GetTrackNextInterestingTime()
- Parameters:
- interestingTimeFlags - Specifies the search criteria.
- time - Specifies a time value that establishes the starting point for the search.
- rate - Contains the search direction.
- Returns:
- a TimeInfo object specifiying the first time value it finds
that meets the search criteria specified in the flags parameter.
insertMedia
public void insertMedia(int trackStart,
int mediaTime,
int mediaDuration,
float mediaRate) throws StdQTException
- This method inserts a reference to a media segment into a track.
QuickTime::InsertMediaIntoTrack()
- Parameters:
- trackStart - Contains a time value specifying where the segment is to be inserted.
- mediaTime - Contains a time value specifying the starting point of the segment in the media.
- mediaDuration - Contains a time value specifying the duration of the media's segment.
- mediaRate - Specifies the media's rate.
insertEmptySegment
public void insertEmptySegment(int dstIn,
int dstDuration) throws StdQTException
- This method adds an empty segment to a track.
QuickTime::InsertEmptyTrackSegment()
- Parameters:
- dstIn - Contains a time value specifying where the segment is to be inserted.
- dstDuration - Contains a time value that specifies the duration of the segment to be added.
deleteSegment
public void deleteSegment(int startTime,
int duration) throws StdQTException
- This method removes a specified segment from a track.
QuickTime::DeleteTrackSegment()
- Parameters:
- startTime - Contains a time value specifying the starting point of the segment to be deleted
- duration - Contains a time value that specifies the duration of the segment to be deleted.
scaleSegment
public void scaleSegment(int startTime,
int oldDuration,
int newDuration) throws StdQTException
- This method changes the duration of a segment of a track.
QuickTime::ScaleTrackSegment()
- Parameters:
- startTime - Specifies the start of the segment.
- oldDuration - Specifies the duration of the segment.
- newDuration - Specifies the new duration of the segment.
newEditState
public TrackEditState newEditState() throws QTException
- You can create an edit state by calling the NewTrackEditState function.
QuickTime::NewTrackEditState()
- Returns:
- the TrackEditState.
useEditState
public void useEditState(TrackEditState state) throws StdQTException
- This method returns a track to its condition according to an edit state you created previously.
QuickTime::UseTrackEditState()
- Parameters:
- state - Specifies the edit state for this operation.
addReference
public int addReference(Track refTrack,
int refType) throws StdQTException
- This method allows you to add a new track reference to a track.
QuickTime::AddTrackReference()
- Parameters:
- refTrack - Specifies the track to be identified in the track reference.
- refType - Specifies the type of reference.
- Returns:
- the index of the added reference.
deleteReference
public void deleteReference(int refType,
int index) throws StdQTException
- This method allows you to remove a track reference from a track.
QuickTime::DeleteTrackReference()
- Parameters:
- refType - Specifies the type of reference.
- index - Specifies the index value of the reference to be deleted.
setReference
public void setReference(Track refTrack,
int refType,
int index) throws StdQTException
- This method allows you to modify an existing track reference.
QuickTime::SetTrackReference()
- Parameters:
- refTrack - Specifies the track to be identified in the track reference.
- refType - Specifies the type of reference.
- index - Specifies the index value of the reference to be changed.
getReference
public Track getReference(int refType,
int index) throws QTException
- This method allows you to retrieve the track identifier contained in an existing track reference.
QuickTime::GetTrackReference()
- Parameters:
- refType - Specifies the type of reference.
- index - Specifies the index value of the reference to be changed.
getNextReferenceType
public int getNextReferenceType(int refType) throws StdQTException
- This method allows you to determine all of the track reference types that are defined for a given track.
QuickTime::GetNextTrackReferenceType()
- Parameters:
- refType - Specifies the type of reference.
getReferenceCount
public int getReferenceCount(int refType) throws StdQTException
- This method allows you to determine how many track references of a given type exist for a track.
QuickTime::GetTrackReferenceCount()
- Parameters:
- refType - Specifies the type of reference.
trackTimeToMediaTime
public int trackTimeToMediaTime(int value) throws StdQTException
- This method allows your application to convert a track's time value to a time value
that is appropriate to the track's media using the track's edit list.
QuickTime::TrackTimeToMediaTime()
- Parameters:
- value - Specifies the track's time value; must be expressed in the time scale of the movie that contains the track.
getEditRate
public float getEditRate(int atTime) throws StdQTException
- This method returns the rate of the track edit of a specified track at an indicated time.
QuickTime::GetTrackEditRate()
- Parameters:
- atTime - Indicates a time value at which the rate of a track edit
(of a track identified in the parameter theTrack) is to be determined.
- Returns:
- the track's edit rate.
getDataSize
public int getDataSize(int startTime,
int duration) throws StdQTException
- This method allows your application to determine the size, in bytes,
of the sample data in a segment of a track.
QuickTime::GetTrackDataSize()
- Parameters:
- startTime - Contains a time value specifying the starting point of the segment.
- duration - Contains a time value that specifies the duration of the segment.
pointInMovie
public boolean pointInMovie(QDPoint pt) throws StdQTException
- This method allows your application to determine whether a specified point lies in the region
defined by a track's display boundary region after
it has been clipped by the movie's final display clipping region.
QuickTime::PtInTrack()
- Parameters:
- pt - Specifies the point to be checked.
getSegmentDisplayBoundsRgn
public Region getSegmentDisplayBoundsRgn(int time,
int duration) throws QTException
- This method allows your application to determine the region a track occupies in a movie's graphics
world during a specified segment.
QuickTime::GetTrackSegmentDisplayBoundsRgn()
- Parameters:
- time - Specifies the starting time of the track segment to consider.
- duration - Specifies the length of the segment to consider. Set this parameter to 0 to
consider an instant in time.
getStatus
public int getStatus()
- This method returns the value of the last error the media encountered while playing a specified track.
QuickTime::GetTrackStatus()
- Returns:
- the value of the last error the media encountered while playing a specified track.
setLoadSettings
public void setLoadSettings(LoadSettings settings) throws StdQTException
- This method allows you to specify a portion of a track that is to be loaded into memory whenever it is played.
QuickTime::SetTrackLoadSettings()
- Parameters:
- settings - a LoadSettings object.
getLoadSettings
public LoadSettings getLoadSettings() throws StdQTException
- This method allows you to retrieve a track's preload information.
QuickTime::GetTrackLoadSettings()
- Returns:
- a LoadSettings object.
insertSegment
public void insertSegment(Track dstTrack,
int srcIn,
int srcDuration,
int dstIn) throws StdQTException
- This method copies part of one track to another.
QuickTime::InsertTrackSegment()
- Parameters:
- dstTrack - Specifies the destination track for this operation.
- srcIn - Specifies the start of the segment in the source track.
- srcDuration - Specifies the duration of the segment in the source track.
- dstIn - Contains a time value specifying where the segment is to be inserted.
copySettings
public void copySettings(Track dstTrack) throws StdQTException
- This method copies many settings from one track to another, overwriting the destination settings.
QuickTime::CopyTrackSettings()
- Parameters:
- dstTrack - Specifies the destination track for this operation.
loadIntoRam
public void loadIntoRam(int time,
int duration,
int flags) throws StdQTException
- This method loads a track's data into memory.
QuickTime::LoadTrackIntoRam()
- Parameters:
- time - Allows you to specify a portion of the track to load.
- duration - Allows you to specify a portion of the track to load.
- flags - Gives you explicit control over what is loaded into memory and how long to keep it around.
isScrapMovie
public MovieImporter isScrapMovie() throws StdQTException
- Looks on the System scrap to find out if it can translate any of the track data into a movie.
QuickTime::IsScrapMovie()
toString
public String toString()
- String representation of this class.
- Overrides:
- toString in class QTObject
All Packages Class Hierarchy This Package Previous Next Index